
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type StoreProductAttrRequest struct {

	ProductId string `json:"product_id" form:"product_id"`

	AttrName string `json:"attr_name" form:"attr_name"`

	AttrValues string `json:"attr_values" form:"attr_values"`

	Type string `json:"type" form:"type"`

}

func (r *StoreProductAttrRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *StoreProductAttrRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"product_id": "required",

		"attr_name": "required",

		"attr_values": "required",

		"type": "required",

	}
}

func (r *StoreProductAttrRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *StoreProductAttrRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *StoreProductAttrRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
